var Findfund = {
	expandedFund:-1,
	loadFunds: function(){
		var args=jQuery('form#search').serialize();
		jQuery.ajax({
			url:"/cfcs/remote.cfc?cfc=fundUtil&method=run&callMethod=renderFundRowResults&"+args,
			type:"GET",
			success:function(data){
				jQuery('div.progress_meter_wrapper').remove();
				jQuery('div#fundArea').html(data);
			}
		});
	},
	
	loadFundDonate: function(fundID) {
		var args="fundID="+fundID;
		jQuery.ajax({
			url:"/cfcs/remote.cfc?cfc=fundUtil&method=run&callMethod=renderFundDonate&"+args,
			type:"GET",
			success:function(data){
				var fundarea = jQuery('div#meter_wrap_'+fundID);
				var content = fundarea.find('div.bar_content');
				content.fadeOut(function(){
					content.empty();
					content.html(data);
					content.slideDown(function(){
						fundarea.find('input.actionButton').hide();
						fundarea.find('input#actionDonateConfirm').show();
						Validate.activate(jQuery('form#donationForm_'+fundID));
					});
				});
			}
		});
	},
	
};

jQuery(document).ready(function(){	
	jQuery('form#search').find('input').keypress(function(event){
		if(event.which == 13) {
			Findfund.loadFunds();
		}
	});
});